<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>layout 管理界面大布局示例 - Layui</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="//unpkg.com/layui@2.9.23/dist/css/layui.css" rel="stylesheet">
  <link rel="stylesheet" href="./首页.css">
</head>

<body>
  <div class="layui-layout layui-layout-admin">
    <div class="layui-header">
      <div class="box">
        <img src="https://tse1-mm.cn.bing.net/th/id/OIP-C.8-R6VuFE3cUm7R6HjMDAagHaHa?rs=1&pid=ImgDetMain" alt="">
      </div>
      <!-- 头部区域（可配合layui 已有的水平导航） -->
      <ul class="layui-nav layui-layout-left">
        <!-- 移动端显示 -->
        <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
          <i class="layui-icon layui-icon-spread-left"></i>
        </li>
        <li class="layui-nav-item layui-hide-xs"><a href="javascript:;">nav 1</a></li>
        <li class="layui-nav-item">
        </li>
      </ul>
      <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item layui-hide layui-show-sm-inline-block">
          <a href="javascript:;" onclick="fna()">
            <img src="//unpkg.com/outeres@0.0.10/img/layui/icon-v2.png" class="layui-nav-img">
            个人中心
          </a>
          <dl class="layui-nav-child">
            <dd><a href="javascript:;" onclick="ger()">添加个人中心</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
          <a href="javascript:;">
            <i class="layui-icon layui-icon-more-vertical"></i>
          </a>
        </li>
      </ul>
    </div>
    <div class="layui-side layui-bg-black">
      <div class="layui-side-scroll">

        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree" lay-filter="test">
          <li class="layui-nav-item layui-nav-itemed">
            <a class="" href="javascript:;">仪表盘</a>
          </li>
          <li class="layui-nav-item">
            <a href="javascript:;">讲师管理</a>
          </li>
        </ul>
      </div>
    </div>
    <div class="layui-body">
      <!-- 内容主体区域 -->
      <div style="padding: 15px;">
        <blockquote class="layui-elem-quote layui-text">
          <span style="color: rgb(71, 130, 184);">讲师管理</span>&ensp;<span>/</span>&ensp;<span>讲师列表</span>
        </blockquote>
        <blockquote class="layui-elem-quote layui-text">
          <!-- <button type="button" class="layui-btn layui-btn-primary" lay-on="test-page-move">添加讲师</button> -->
          <button onclick="add()">添加讲师</button>
        </blockquote>
        <div class="layui-card layui-panel">
          <div class="layui-card-header">
            <input type="text" class="inp"><button class="inp-but" onclick="sou()">搜索</button>
            <table border="2px">
              <thead>
                <tr>
                  <th>编号</th>
                  <th>姓名</th>
                  <th>昵称</th>
                  <th>出生日期</th>
                  <th>性别</th>
                  <th>手机号</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody id="data-list">

              </tbody>
            </table>
          </div>
          <div class="layui-card-body">

          </div>
        </div>
        <br><br>
      </div>
    </div>
  </div>
  <div class="bot">
    <div id="pagination">
      <button onclick="fetchData(currentPage - 1)" class="bott">上一页</button>
      <span id="current-page">1</span> / <span id="total-pages">1</span>
      <button onclick="fetchData(currentPage + 1)" class="bott">下一页</button>
    </div>
  </div>

  <!-- 2 -->
  <!-- 仪表盘 -->
  <div class="layui-body sh">
    <!-- 内容主体区域 -->
    <div style="padding: 15px; margin-top: 60px;">
      <blockquote class="layui-elem-quote layui-text">
        <span style="color: rgb(71, 130, 184)">教师数据图表</span>&ensp;<span>/</span>&ensp;<span>图表实例</span>
      </blockquote>
      <blockquote class="layui-elem-quote layui-text">
        <button>图标实例</button>
      </blockquote>
      <div class="layui-card layui-panel">
        <div class="layui-card-header">
          <div id="main"></div>
          <div id="mai"></div>
        </div>
        <div class="layui-card-bodys">

        </div>
      </div>
      <br><br>
    </div>
  </div>
  </div>






  <!-- 添加 -->
  <!-- 3 -->
  <div class="w">
    <div class="layui-body">
      <div style="padding: 15px; margin-top: 60px;">
        <blockquote class="layui-elem-quote layui-text">
          <span style="color: rgb(71, 130, 184);">讲师管理</span>&ensp;<span>/</span>&ensp;<span>讲师添加</span>
        </blockquote>
        <blockquote class="layui-elem-quote layui-text" style="height: 50px;">
          <div class="bac"></div>
          <span class="bac1">退出</span>
        </blockquote>
        <div class="layui-card layui-panel">
          <div class="layui-card-header">
            <div class="boxs">
              <span>姓名:</span><input type="text" placeholder="讲师名称"><br>
              <span>昵称:</span><input type="text"><br>
              <span>生日:</span><input type="text"><br>
              <span>手机号:</span><input type="text"><br>
              <span>类型:</span><input type="text"><br>
              <span>性别:</span><input type="text"><br>
              <button onclick="add1()">确认</button>
            </div>
          </div>
          <div class="layui-card-bodys">

          </div>
        </div>
        <br><br>
      </div>
    </div>
  </div>
  </div>



  <!-- 个人 -->
  <!-- 4-->
  <div class="w2">
    <div class="layui-body">
      <div style="padding: 15px; margin-top: 60px;">
        <blockquote class="layui-elem-quote layui-text">
          <span style="color: rgb(71, 130, 184);">添加个人中心</span>&ensp;<span>/</span>&ensp;<span>个人中心</span>
        </blockquote>
        <blockquote class="layui-elem-quote layui-text" style="height: 50px;">
          <div class="bac" onclick="bc()"></div>
          <span class="bac1" onclick="bc1()">退出</span>
        </blockquote>
        <div class="layui-card layui-panel">
          <div class="layui-card-header">
            <div class="boxs12">
              <div id="box">
                <h3>添加个人中心</h3><br>
                <span>姓名:</span><input type="text"><br>
                <span>图片:</span><input type="text"><br>
                <span>昵称:</span><input type="text"><br>
                <span>性别:</span><input type="text"><br>
                <span>出生日期:</span><input type="text"><br>
                <span>手机号:</span><input type="text"><br>
                <span>电子邮箱:</span><input type="text"><br>
                <span>入职日期:</span><input type="text"><br>
                <span>个人介绍:</span><input type="text"><br>
                <button onclick="del1()">确定</button>
              </div>
            </div>
          </div>
          <div class="layui-card-bodys">

          </div>
        </div>
        <br><br>
      </div>
    </div>
  </div>
  </div>




  <!-- 个人 -->
  <!-- 4-->
  <div id="ks">
    <div class="layui-body">
      <div style="padding: 15px; margin-top: 60px;">
        <blockquote class="layui-elem-quote layui-text">
          <span style="color: rgb(71, 130, 184);">个人中心</span>&ensp;<span>/</span>&ensp;<span>添加个人中心</span>
        </blockquote>
        <blockquote class="layui-elem-quote layui-text" style="height: 50px;">
          <div class="bac" onclick="bc()"></div>
          <span class="bac1" onclick="bc1()">退出</span>
        </blockquote>
        <div class="layui-card layui-panel">
          <div class="layui-card-header">
            <div class="boxs12">
              <div id="boxs">
                <h3>个人中心</h3><br>
                <span>姓名:</span><span id="name"></span><br>
                <span>图片:</span><span id="img"></span><br>
                <span>昵称:</span><span id="nick"></span><br>
                <span>性别:</span><span id="sex"></span><br>
                <span>出生日期:</span><span id="birthdata"></span><br>
                <span>手机号:</span><span id="iphone"></span><br>
                <span>电子邮箱:</span><span id="emails"></span><br>
                <span>入职日期:</span><span id="indate"></span><br>
                <span>个人介绍:</span><textarea id="mydes"></textarea><br>
              </div>
            </div>
          </div>
          <div class="layui-card-bodys">

          </div>
        </div>
        <br><br>
      </div>
    </div>
  </div>
  </div>
  <!-- 编辑 -->
  <!-- 3 -->
  <div class="ww">
    <div class="layui-body">
      <div style="padding: 15px; margin-top: 60px;">
        <blockquote class="layui-elem-quote layui-text">
          <span style="color: rgb(71, 130, 184);">讲师管理</span>&ensp;<span>/</span>&ensp;<span>讲师编辑</span>
        </blockquote>
        <blockquote class="layui-elem-quote layui-text" style="height: 50px;">
          <div class="bac" onclick="bac()"></div>
          <span class="bac1" onclick="bac1()">退出</span>
        </blockquote>
        <div class="layui-card layui-panel">
          <div class="layui-card-header">
            <div class="boxs">
              <span>姓名</span>&ensp;&ensp;&ensp;&ensp;
              <input type="text" class="boxs-input"><br>
              <span>出生日期</span>
              <input type="text" class="boxs-input"><br>
              <span>性别</span>&ensp;&ensp;&ensp;&ensp;
              <input type="text" class="boxs-input"><br>
              <button onclick="xiu1()">编辑</button>
            </div>
          </div>
          <div class="layui-card-bodys">

          </div>
        </div>
        <br><br>
      </div>
    </div>
  </div>
  </div>



  <script src="https://cdn.jsdelivr.net/npm/echarts@5.5.1/dist/echarts.min.js"></script>
  <script src="//unpkg.com/layui@2.9.23/dist/layui.js"></script>
  <script src="https://code.jquery.com/jquery-3.7.1.js"></script>
  <script src="./首页.js"></script>
  <script>
    // JS
    layui.use(['element', 'layer', 'util'], function () {
      var element = layui.element;
      var layer = layui.layer;
      var util = layui.util;
      var $ = layui.$;

      // 头部事件
      util.event('lay-header-event', {
        menuLeft: function (othis) { // 左侧菜单事件
          layer.msg('展开左侧菜单的操作', { icon: 0 });
        },
        menuRight: function () {  // 右侧菜单事件
          layer.open({
            type: 1,
            title: '更多',
            content: '<div style="padding: 15px;">处理右侧面板的操作</div>',
            area: ['260px', '100%'],
            offset: 'rt', // 右上角
            anim: 'slideLeft', // 从右侧抽屉滑出
            shadeClose: true,
            scrollbar: false
          });
        }
      });
    });
    //查看
    function cha(id) {
      $.ajax({
        type: 'get',
        url: 'http://47.94.4.201/index.php/index/index/getteacherbyid',
        data: {
          id: id
        },
        dataType: 'json',
        success: (a) => {
          console.log(a.data);
          // 在此处输入 layer 的任意代码
          layer.open({
            type: 1, // page 层类型
            area: ['1050px', '600px'],
            title: 'Hello layer',
            shade: 0.6, // 遮罩透明度
            shadeClose: true, // 点击遮罩区域，关闭弹层
            maxmin: true, // 允许全屏最小化
            anim: 0, // 0-6 的动画形式，-1 不开启
            content: '<div style="padding: 15px;"></div>'
          });
          $('.layui-layer-content').append(`
            <div class="tab">
    <table border="1">
      <thead>
        <tr>
          <th>姓名:</th>
          <td>${a.data.name}</td>
          <th>职位:</th>
          <td>讲师</td>
          <td rowspan="3"><img src="https://p1.ssl.qhimg.com/t01993b1402475f7723.png" alt=""></td>
        </tr>
        <tr>
          <th>花名:</th>
          <td>${a.data.nick}</td>
          <th>出生日期:</th>
          <td>${a.data.birthdata}</td>
        </tr>
        <tr>
          <th>性别:</th>
          <td>${a.data.sex}</td>
          <th>入职日期:</th>
          <td>2025-1-3</td>
        </tr>
        <tr>
          <th>手机号:</th>
          <td colspan="2">${a.data.iphone}</td>
          <th colspan="1">邮箱:</th>
          <td>liqingzhao@itcast.cn</td>
        </tr>
        <tr>
          <th>籍贯:</th>
          <td colspan="4">山东省 济南市 章丘市</td>
        </tr>
        <tr style="height: 180px;">
          <td colspan="5">人生是需要用苦难浸泡的，没有了伤痛，生命就少了炫彩和厚重。只有在伤口中盛开的花朵，才是陪伴我们默默前行的风景。不要在意小小的委屈，难过只是你心情的点缀，而不是制约你灵魂的枷锁。该铭记的，就把它雕刻在心灵的石碑上；该淡忘的，就把它融入宣泄的泪水中。让我们从困苦中借力，在隐忍中坚强。</td>
        </tr>
      </thead>
    </table>
  </div>
          `)
        },
        error: (e) => {
          console.log(e);
        }
      })
    }
  </script>
</body>

</html>